package guoanmaker.operator.business.repository;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import guoanmaker.operator.business.model.OperatorUserSignIn;
import guoanmaker.operator.business.model.OperatorUserSignInActive;



public interface OperatorUserSignInRepository extends  JpaRepository<OperatorUserSignIn, String>, JpaSpecificationExecutor<OperatorUserSignIn>{
	 @Query("select r from OperatorUserSignIn r where r.perUserId=:perUserId and r.signInAcId=:signInAcId")	
		public OperatorUserSignIn  selectByOperatorUserSignIn(@Param("perUserId") String perUserId,@Param("signInAcId") String signInAcId);
	 @Query("select u from OperatorUserSignIn u where u.signInAcId=:signInAcId")
	 public Page<OperatorUserSignIn> findByOperatorUserSignInBypage(Pageable pageable,@Param("signInAcId") String signInAcId);
	 
	 @Query("select u from OperatorUserSignIn u where u.signInAcId=:signInAcId order by signInNum desc")
	 public List<OperatorUserSignIn> findByOperatorUserSignInList(@Param("signInAcId") String signInAcId);
}
